{
  "$schema" : "http://json-schema.org/draft/2019-09/schema#",
  "title" : "Outbound Acknowledgement",
  "type" : "object",
  "additionalProperties" : false,
  "properties" : {
    "interfaceCategory" : {
      "type" : "string",
      "enum" : [ "COMMS" ],
      "description" : "CMP categorisation of the job associated with this file."
    },
    "interfaceType" : {
      "type" : "string",
      "enum" : [ "ACKNOWLEDGEMENT" ],
      "description" : "Sub-categorisation of the job"
    },
    "version" : {
      "type" : "number",
      "minimum" : 1.0,
      "maximum" : 1.0,
      "description" : "The current version of the generic extract file. This must match the corresponding outbound file."
    },
    "commsRequestId" : {
      "type" : "integer",
      "minimum" : 1,
      "description" : "This is the unique id in CMP for this Comm Request."
    },
    "distributionReference" : {
      "type" : "string",
      "maxLength" : 50,
      "description" : "Used to allow the third-party system to record its unique id against the comm."
    },
    "sentDateTime" : {
      "type" : "string",
      "format" : "date-time",
      "description" : "Indicates when the third-party adapter sent the comm to the third party system that is responsible for the actual sending of the comm"
    },
    "actualSentDateTime": {
      "type" : "string",
      "format" : "date-time",
      "description" : "Indicates when the third-party system responsible for the actual sending of the comm sent the comm"
    },
    "actualDistributionMethod" : {
      "type" : "string",
      "maxLength" : 30,
      "description" : "This can be used by an third-party system to record by what mechanism it actually sent a comm to the end user"
    },
    "actualDistributionTarget" : {
      "type" : "string",
      "maxLength" : 70,
      "description" : "This can be used by an third-party system to record to what target it actually sent the comms to e.g. it may have been an email, mobile number, postal address etc"
    },
    "errorDescription" : {
      "type" : "string",
      "maxLength" : 70,
      "description" : "This canbe used by a third-party system to record a description of an error in the distribution of the comm"
    },
    "distributionStatus" : {
      "type" : "string",
      "enum" : [ "AWAITING_MERGE", "PUBLISHED", "AWAITING_DISTRIBUTION", "SENT", "ERROR_NO_RETRY", "ERROR_RETRY", "IN_PROGRESS" ],
      "description" : "The status that the comms can be set to"
    }
  },
  "required" : [ "interfaceCategory", "interfaceType", "version", "commsRequestId" ]
}